package com.itheima.zhuanhuan;

import java.io.*;

/*
转换流的应用场景


 */
public class Demo03 {
    public static void main(String[] args) throws IOException {
        //将 字节 转换成 字符
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("C:\\Users\\Administrator\\Desktop\\斗破苍穹.txt"),"gbk"));

        //字符转换成字节
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("day13\\aaa\\doupo.txt"),"utf-8"));

        String s=null;
        while ((s=reader.readLine())!=null){
            writer.write(s);
            writer.newLine();
        }
        reader.close();
        writer.close();



    }


}

